package com.cheng.chengrobot.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import net.mamoe.mirai.contact.Friend;

@TableName("robot_friend")
@Data
public class RobotFriend
{
    @TableId(type = IdType.AUTO)
    private Integer id;
    private Long robotQq;//自己qq号
    private Long Qq;//好友qq号
    private String nickName;//好友昵称
    private String remark;//好友备注
    private Boolean playgroundManager;
    private Boolean gpt;

    public static RobotFriend getInstanceFromFriend(Friend friend)
    {
        RobotFriend robotFriend = new RobotFriend();
        robotFriend.setRobotQq(friend.getBot().getId());
        robotFriend.setQq(friend.getId());
        robotFriend.setNickName(friend.getNick());
        robotFriend.setRemark(friend.getRemark());
        return robotFriend;
    }
}
